package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.GoodsDao;
import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsDao goodsDao;

    @Override
    public List<Goods> selectList(Integer page, Integer rows, String codeOrName, Integer goodsTypeId) {
        page=(page-1)*rows;
        List<Goods> list=goodsDao.selectList(page,rows,codeOrName,goodsTypeId);
        return list;
    }
}
